package com.gz.EuchreU.Contants;

public class Suits {
	public final static int DIAMONDS = 0;
	public final static int CLUBS 	= DIAMONDS + 1;
	public final static int HEARTS 	= CLUBS + 1;
	public final static int SPADES	= HEARTS + 1;
	public final static int NONE	= SPADES + 1;
	
	private static int mCurrentTrumpID = NONE;
	
	public static void setTrump(int pTrumpID){
		
		switch (pTrumpID) {
		case CLUBS:
		case SPADES:
		case DIAMONDS:
		case HEARTS:
			mCurrentTrumpID = pTrumpID;
			break;
		default:
			mCurrentTrumpID = NONE;
			break;
		}
		
		GameState.LogState("Setting TrumpCard:" + pTrumpID + "=" + mCurrentTrumpID);
		
	}
	
	public static int getTrumpID(){
		return mCurrentTrumpID;
	}
	
	public static int getLeftSuitID(){
		switch (mCurrentTrumpID) {
		case CLUBS:
			return SPADES;
		case SPADES:
			return CLUBS;
		case DIAMONDS:
			return HEARTS;
		case HEARTS:
			return DIAMONDS;
		default:
			return NONE;
		}
	}
	
	public static int getPotentialLeftSuitID(int pPotintialTrumpID){
		switch (pPotintialTrumpID) {
		case CLUBS:
			return SPADES;
		case SPADES:
			return CLUBS;
		case DIAMONDS:
			return HEARTS;
		case HEARTS:
			return DIAMONDS;
		default:
			return NONE;
		}
	}
	
	public static String ToString(int pSuitID){
		switch (pSuitID) {
		case CLUBS:
			return "Clubs";
		case DIAMONDS:
			return "Diamonds";
		case HEARTS:
			return "Hearts";
		case SPADES:
			return "Spades";
		default:
			return "None";
		}
	}
}
